package com.iis.testing;

import java.util.ArrayList;
import java.util.Date;

import com.iis.entity.Agent;
import com.iis.entity.Salesman;

public class TestAgentDAO {

	public static void main(String[] args) {
		getAll();
		//saveNew();
	}

	public static void saveNew() {

		for (int i = 0; i < 10; i++) {
			Agent agent = new Agent();
			agent.setName("Agent Asuransi  " + i);
			agent.setAddress("Address Agent " + i);
			agent.setRegion("Region Agent " + i);
			agent.save();
		}

	}

	public static void getAll() {
		ArrayList<Agent> sample = Agent.getAll();
		for (Agent x : sample) {
			System.out.println(x.getName());
		}
	}

}
